using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Features
{
    /// <summary>
    /// <para>Polygon To Line</para>
    /// <para>Creates a feature class containing lines that are converted from polygon boundaries with or without considering neighboring polygons.</para>
    /// <para>创建一个要素类，其中包含从面边界转换而来的线，无论是否考虑相邻面。</para>
    /// </summary>    
    [DisplayName("Polygon To Line")]
    public class PolygonToLine : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public PolygonToLine()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The input features that must be polygon.</para>
        /// <para>必须为面的输入要素。</para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>The output line feature class.</para>
        /// <para>输出线要素类。</para>
        /// </param>
        public PolygonToLine(object _in_features, object _out_feature_class)
        {
            this._in_features = _in_features;
            this._out_feature_class = _out_feature_class;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Polygon To Line";

        public override string CallName => "management.PolygonToLine";

        public override List<string> AcceptEnvironments => ["MDomain", "MResolution", "MTolerance", "XYResolution", "XYTolerance", "ZDomain", "ZResolution", "ZTolerance", "extent", "outputCoordinateSystem", "outputMFlag", "outputZFlag", "outputZValue", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_features, _out_feature_class, _neighbor_option.GetGPValue()];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The input features that must be polygon.</para>
        /// <para>必须为面的输入要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The output line feature class.</para>
        /// <para>输出线要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Identify and store polygon neighboring information</para>
        /// <para><xdoc>
        ///   <para>Specifies whether or not to identify and store polygon neighboring information.
        ///   <bulletList>
        ///     <bullet_item>Checked— Polygon neighboring relationship will be identified and stored in the output. If different segments of a polygon share boundary with different polygons, the boundary will be split such that each uniquely shared segment will become a line with its two neighboring polygon FIDs stored in the output, as shown in the illustration. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Unchecked— Polygon neighboring relationship will be ignored; every polygon boundary will become a line feature with its original polygon feature ID stored in the output.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定是否标识和存储多边形相邻信息。
        ///   <bulletList>
        ///     <bullet_item>选中 - 将识别多边形相邻关系并将其存储在输出中。如果多边形的不同线段与不同的多边形共享边界，则边界将被分割，以便每个唯一共享的线段都将成为一条线，其两个相邻的多边形 FID 存储在输出中，如图所示。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>未选中 - 将忽略多边形相邻关系;每个面边界都将成为线要素，其原始面要素 ID 存储在输出中。 </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Identify and store polygon neighboring information")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _neighbor_option_value _neighbor_option { get; set; } = _neighbor_option_value._true;

        public enum _neighbor_option_value
        {
            /// <summary>
            /// <para>IDENTIFY_NEIGHBORS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("IDENTIFY_NEIGHBORS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>IGNORE_NEIGHBORS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("IGNORE_NEIGHBORS")]
            [GPEnumValue("false")]
            _false,

        }

        public PolygonToLine SetEnv(object MDomain = null, object MResolution = null, object MTolerance = null, object XYResolution = null, object XYTolerance = null, object ZDomain = null, object ZResolution = null, object ZTolerance = null, object extent = null, object outputCoordinateSystem = null, object outputMFlag = null, object outputZFlag = null, object outputZValue = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(MDomain: MDomain, MResolution: MResolution, MTolerance: MTolerance, XYResolution: XYResolution, XYTolerance: XYTolerance, ZDomain: ZDomain, ZResolution: ZResolution, ZTolerance: ZTolerance, extent: extent, outputCoordinateSystem: outputCoordinateSystem, outputMFlag: outputMFlag, outputZFlag: outputZFlag, outputZValue: outputZValue, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}